<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Dummyserver</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="ODTONE 0.4">
<link rel="up" href="../app.html" title="Applications">
<link rel="prev" href="client_index.html" title="Client">
<link rel="next" href="../extensions.html" title="ODTONE Extensions">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="'ODTONE - Open Dot Twenty One'" width="100" height="100" src="../.././images/logo.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="client_index.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../app.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../extensions.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="odtone.app.dummyserver_index"></a><a class="link" href="dummyserver_index.html" title="Dummyserver">Dummyserver</a>
</h3></div></div></div>
<div class="toc"><dl><dt><span class="section"><a href="dummyserver_index.html#odtone.app.dummyserver_index.dummyserver_getStart">Getting
        Started</a></span></dt></dl></div>
<p>
        The <span class="emphasis"><em>dummyserver</em></span> is a simple application that, as the
        name implies, works like a dummy server. It is always listening (at port
        4000) for incoming messages and print them in the console.
      </p>
<p>
        This pretends to simulate either a MIHF or a MIH SAP.
      </p>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="odtone.app.dummyserver_index.dummyserver_getStart"></a><a class="link" href="dummyserver_index.html#odtone.app.dummyserver_index.dummyserver_getStart" title="Getting Started">Getting
        Started</a>
</h4></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="dummyserver_index.html#odtone.app.dummyserver_index.dummyserver_getStart.extending">Extending</a></span></dt>
<dt><span class="section"><a href="dummyserver_index.html#odtone.app.dummyserver_index.dummyserver_getStart.running">Running</a></span></dt>
</dl></div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="odtone.app.dummyserver_index.dummyserver_getStart.extending"></a><a class="link" href="dummyserver_index.html#odtone.app.dummyserver_index.dummyserver_getStart.extending" title="Extending">Extending</a>
</h5></div></div></div>
<p>
            It is possible to modify the behaviour of the dummyserver when it receives
            a new message. To do it, the "<code class="computeroutput">static void process_message(meta_message_ptr&amp;
            msg)</code>" function must be modified according to the desired
            behavior.
          </p>
<p>
            E.g.: Let's change the dummyserver behavior in order to send the received
            message to a specific destination (assuming that the mechanisms for sending
            messages have already been defined):
          </p>
<p>
</p>
<pre class="programlisting">static void process_message(meta_message_ptr&amp; msg)
{
	std::cout &lt;&lt; "MIH message: Service=" &lt;&lt; msg-&gt;sid()
		  &lt;&lt; " Opcode=" &lt;&lt; msg-&gt;opcode()
		  &lt;&lt; " Action=" &lt;&lt; msg-&gt;aid()
		  &lt;&lt; std::endl;

	sap.send(msg);
}
</pre>
<p>
          </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="odtone.app.dummyserver_index.dummyserver_getStart.running"></a><a class="link" href="dummyserver_index.html#odtone.app.dummyserver_index.dummyserver_getStart.running" title="Running">Running</a>
</h5></div></div></div>
<p>
            Just run dummyserver and wait for incoming messages!
          </p>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2012 Universidade
      Aveiro<br>Copyright &#169; 2009-2012 Instituto
      de Telecomunica&#231;&#245;es - P&#243;lo Aveiro<p>
        This software is distributed under a license. The full license agreement
        can be found in the LICENSE in this distribution. This software may not be
        copied, modified, sold or distributed other than expressed in the named license
        agreement. This software is distributed without any warranty.
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="client_index.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../app.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../extensions.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
